#include "6-balance_bit_tree.hpp"

int main(int argc, char* argv[])
{
  int arr[] = {13,10,9,15,14,12, 17,18,19,5,11};
  int len = sizeof(arr) / sizeof(arr[0]);

  BalanceBitTree<int> tree;
  // BitSortTree<int> tr;
  for (int i = 0; i < len; ++i) {
    std::cout << arr[i] << " add" << std::endl;
    tree.insertNode(arr[i]);
    tree.print();
    // tr.insertNode(arr[i]);
  }

  for (int i = 0; i < len; ++i) {
    // std::cout << tree.getHight() << "," << tree.getBalance() << std::endl;
    // tree.print();
    std::cout << arr[i] << " del" << std::endl;
    tree.delNode(arr[i]);
    tree.print();
  }

  // tr.print();
  // tr.tree = treeToAVL(tr.tree);
  // tr.print();
  return 0;
}

